Normalize syncrule class names to Python style in from_document#40
Merged
Conversation
The ndi_syncrule_class field in documents uses MATLAB dot notation (e.g. 'ndi.time.syncrule.filematch') but the class_map lookup used Python underscore names. Normalize via ndi_python_classname before lookup so documents from NDI-matlab resolve to the correct subclass. https://claude.ai/code/session_01Aq4Kts1jXTv4curJgKjdRF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updated the
from_documentmethod inndi_time_syncruleto normalize syncrule class names to Python-style naming conventions before instantiation.Key Changes
ndi_python_classnameutility function fromutil.classnamendi_python_classname()to normalize the class name before use, ensuring consistent Python naming conventions (e.g., converting from other naming styles to snake_case or PascalCase as appropriate)Implementation Details
The change ensures that syncrule class names stored in documents are properly normalized to Python naming conventions before being used for class instantiation, improving compatibility and consistency across different document sources.
https://claude.ai/code/session_01Aq4Kts1jXTv4curJgKjdRF